﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Entity;
using BAL;
using Common;

namespace Web
{
    public partial class PostSubject : System.Web.UI.Page
    {
        private int delid = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!UserValidate.CheckLogin(this.Request, "SubjectDel"))
            {
                Response.Write("<script type=\"text/javascript\">top.location.href='login.aspx';</script>");
                Response.Redirect("login.aspx");
                Response.End();
            }

            if (Request.QueryString["delid"] != null)
            {
                delid = Convert.ToInt32(Request.QueryString["delid"].Trim());
                //User_Subject.DelInfo(0,delid);//删除关联
                Subject.DelSubject(delid);
                Response.Redirect("admindata.aspx");
            }
            else
            {
                Utility.ShowJsAlertAndRedirect("admindata.aspx", "一般系统保护性错误", this);
            }
        }
    }
}
